package org.raymond.iworks.study.example;

import org.raymond.iworks.repository.entity.TSysLog;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.Map;

/**
 * @author raymond
 * @version V1.0
 * @Description: TODO
 */
public interface DynamicRepository extends JpaRepository<TSysLog, Long> {

    @Query(value = "select * from ?1 order by _rowid limit 1", nativeQuery = true)
    Map<String, Object> queryFirstData(String tableName);
}
